<script setup lang="ts">
const { safeAreaInsets } = uni.getWindowInfo()
</script>

<template>
  <view class="container" :style="{ paddingTop: `${safeAreaInsets.top}px` }">
    <!-- 导航栏插槽 -->
    <view class="navbar">
      <slot name="navbar"></slot>
    </view>

    <!-- 内容容器插槽 -->
    <view class="content-container">
      <slot name="default"></slot>
    </view>
  </view>
</template>

<style lang="scss" scoped>
.container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background-image: url(@/static/images/navigator_bg.png);
  background-size: cover;
}

.navbar {
  padding-bottom: 30rpx;
}

.content-container {
  flex: 1;
  margin-top: -15rpx;
  z-index: 1;
  background-color: #fff;
  border-radius: 15rpx 15rpx 0 0;
  box-shadow: 0 4rpx 20rpx rgba(0, 0, 0, 0.05);
}
</style>
